<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Home</title>
        <style type="text/css">.errorClass{color: red}</style>
    </head>
    <body>
        <h1>添加</h1>
        <p>添加学生信息<c:out value="${show}"/></p>
        <form:form id="addStu" modelAttribute="student" method="post" action="addStudent">
        	<form:errors path="*"/>
	        <table border="1px;">
	        	<tr>
	        		<td>用户名</td>
	        		<td>
	        			<form:errors path="stuName" cssClass="errorClass"/>
	        			<form:input path="stuName"/>
	        		</td>
	        	</tr>
	        	<tr>
	        		<td>密码</td>
	        		<td>
	        			<form:errors path="password" cssClass="errorClass"/>
	        			<form:input path="password"/>
	        		</td>
	        	</tr>
	        	<tr>
	        		<td>邮箱</td>
	        		<td>
	        			<form:errors path="email" cssClass="errorClass"/>
	        			<form:input path="email"/>
	        		</td>
	        	</tr>
	        	<tr>
	        		<td colspan="2"><input type="submit" name="提交"></td>
	        	</tr>
	        </table>
        </form:form>
    </body>
</html>
